<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>CSS3选择器</title>
 <style type="text/css">
	input[class]{
		background-color:pink;
	}
	input[class="class1"]{
		background-color:black;
	}
	input[name^=tag]{
		background-color:#b4b4b4;
	}
	input[name$=o3]{
		background-color:red;
	}
	input[name*=no]{
		background-color:blue;
	}
 </style>
 </head>
 <body>
	<input type="text" name="tomno1" value="tom1" class="class1"><br>
	<input type="text" name="tagno2" value="tom2" class="class2"><br>
	<input type="text" name="tbfno3" value="tom3" class="class3"><br>
	<input type="text" name="tbmno4" value="tom4" class="class4"><br>
 </body>
 </html>